@tagHelperPrefix "my:"

@using Microsoft.AspNetCore.Identity
@inject SignInManager<ApplicationUser> SignInManager
@inject UserManager<ApplicationUser> UserManager

<ul class="navbar-nav">
    @*@if (SignInManager.IsSignedIn(User))
        {*@
    <my:li class="nav-item" condition="SignInManager.IsSignedIn(User)">
        <my:a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @User.Identity.Name!</my:a>
    </my:li>
    <my:li class="nav-item" condition="SignInManager.IsSignedIn(User)">
        <my:form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Action("Index", "Home", new { area = "" })">
            <button type="submit" class="nav-link btn btn-link text-dark">Logout</button>
        </my:form>
    </my:li>
    @*}
        else
        {*@
    <my:li class="nav-item" condition="!SignInManager.IsSignedIn(User)">
        <my:a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Register">Register</my:a>
    </my:li>
    <my:li class="nav-item" condition="!SignInManager.IsSignedIn(User)">
        <my:a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Login">Login</my:a>
    </my:li>
    @* } *@
</ul>